package src;
/**
 * Die Klasse <code>BasicItem</code> implementiert ein Medium.
 * 
 * @author anon
 * @version 26.11
 * 
 */

// ############################## Datenfelder ##############################

public abstract class BasicItem implements Item {
	private String publicationDate;
	private String title;
	private String author;

// ############################## Konstruktoren ##############################

	public BasicItem(String title, String author, String publicationDate) {
		this.title = title;
		this.author = author;
		this.publicationDate = publicationDate;
	}

// ############################## Methoden ##############################

	public String getPublicationDate() {
		return this.publicationDate;
	}

	public String getTitle() {
		return this.title;
	}

	public String getAuthor() {
		return this.author;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof BasicItem) {
			BasicItem tmp = (BasicItem) obj;
			if (title.equals(tmp.getTitle()))
				if (author.equals(tmp.getAuthor()))
					if (publicationDate.equals(tmp.getPublicationDate()))
						return true;
		}
		return false;
	}
}
